<?php

/**
 * 
 * global variable
 *      - database_name
 *      - table_name 
 *      - meta_tpl  : direktori template 
 */
return array(
    'dbName' => "Default",
    'tableName' => "syn_customer",
    'packageName' => "synmkt.customer",
    'moduleTitle' => "Marketing",
    'compName' => "Customer",
    'compDesc' => "Customer",
    'templateDir' => "subak",
    
    'sort_rule' => "name ASC",
     
    'fieldLabel' => array(
        
        'syn_customer_id'    => 'Id',
        'manuf' => 'Manufacture',
    
        'address1_type' => 'Type',
        'address1_address' => 'Address',
        'address1_country' => 'Country',
        'address1_province' => 'Province',
        'address1_regency' => 'Regency',
        'address1_pos_code' => 'Pos Code',
        'address1_email' => 'Email',
        'address1_phone' => 'Phone',
        'address1_fax' => 'Fax',

        'address2_type' => 'Type',
        'address2_address' => 'Address',
        'address2_country' => 'Country',
        'address2_province' => 'Province',
        'address2_regency' => 'Regency',
        'address2_pos_code' => 'Pos Code',
        'address2_email' => 'Email',
        'address2_phone' => 'Phone',
        'address2_fax' => 'Fax',
        
        'contact1_photo' => 'Photo',
        'contact1_name' => 'Name',
        'contact1_position' => 'Position',
        'contact1_email' => 'Email',
        'contact1_phone' => 'Phone',
        'contact1_fax' => 'Fax',
        'contact1_hp' => 'HP',
        'contact1_tweeter' => 'Tweeter Id',
        'contact1_pin_bb' => 'BB Id',
        
        'contact2_photo' => 'Photo',
        'contact2_name' => 'Name',
        'contact2_position' => 'Position',
        'contact2_email' => 'Email',
        'contact2_phone' => 'Phone',
        'contact2_fax' => 'Fax',
        'contact2_hp' => 'HP',
        'contact2_tweeter' => 'Tweeter Id',
        'contact2_pin_bb' => 'BB Id',        
    ),
    'fieldElement' => array(
        'manuf' => 'Listbox',

        'address1_type'     => 'Listbox',
        'address1_country'  => 'Listbox',
        'address1_province' => 'Listbox',
        'address1_regency'  => 'Listbox',
        
        'address2_type'     => 'Listbox',
        'address2_country'  => 'Listbox',
        'address2_province' => 'Listbox',
        'address2_regency'  => 'Listbox',
        
        'contact1_photo'    => 'ImageUploader',
        'contact1_position' => 'Listbox',
        'contact2_photo'    => 'ImageUploader',
        'contact2_position' => 'Listbox',        
    ),
    
    
    'fieldLOV' => array(
        'manuf'             => 'syncommon.lov.CustomerLOV(Manuf)',

        'address1_type'     => 'syncommon.lov.CustomerLOV(AddressType)',
        'address1_country'  => 'syncommon.location.country.do.CountrySortDO[name:Id]',
        'address1_province' => "syncommon.location.province.do.ProvinceSortDO[name:Id], syn_location_country_id = '{@:Elem[fld_address1_country].Value}'",
        'address1_regency'  => "syncommon.location.regency.do.RegencySortDO[name:Id], syn_location_province_id = '{@:Elem[fld_address1_province].Value}'",
        
        'address2_type'     => 'syncommon.lov.CustomerLOV(AddressType)',
        'address2_country'  => 'syncommon.location.country.do.CountrySortDO[name:Id]',
        'address2_province' => "syncommon.location.province.do.ProvinceSortDO[name:Id], syn_location_country_id = '{@:Elem[fld_address2_country].Value}'",
        'address2_regency'  => "syncommon.location.regency.do.RegencySortDO[name:Id], syn_location_province_id = '{@:Elem[fld_address2_province].Value}'",
        
        'contact1_position' => 'syncommon.lov.CustomerLOV(JobPosition)',
        'contact2_position' => 'syncommon.lov.CustomerLOV(JobPosition)',
    ),
    
    'fieldEvent' => array(
        'address1_country' => array(
                array( 
                    'event' => 'onchange',
                    'function'  => 'UpdateForm()',
                ),
            ),
        'address1_province' => array(
                array( 
                    'event' => 'onchange',
                    'function'  => 'UpdateForm()',
                ),
            ),
        'address2_country' => array(
                array( 
                    'event' => 'onchange',
                    'function'  => 'UpdateForm()',
                ),
            ),
        'address2_province' => array(
                array( 
                    'event' => 'onchange',
                    'function'  => 'UpdateForm()',
                ),
            ),
        
    ),
    
    'fieldElementSet' => array(
        'address1_type' => 'Address 1',
        'address1_address' => 'Address 1',
        'address1_country' => 'Address 1',
        'address1_province' => 'Address 1',
        'address1_regency' => 'Address 1',
        'address1_pos_code' => 'Address 1',
        'address1_email' => 'Address 1',
        'address1_phone' => 'Address 1',
        'address1_fax' => 'Address 1',

        'address2_type' => 'Address 2',
        'address2_address' => 'Address 2',
        'address2_country' => 'Address 2',
        'address2_province' => 'Address 2',
        'address2_regency' => 'Address 2',
        'address2_pos_code' => 'Address 2',
        'address2_email' => 'Address 2',
        'address2_phone' => 'Address 2',
        'address2_fax' => 'Address 2',
        
        'contact1_photo' => 'Contact 1',
        'contact1_name' => 'Contact 1',
        'contact1_position' => 'Contact 1',
        'contact1_email' => 'Contact 1',
        'contact1_phone' => 'Contact 1',
        'contact1_fax' => 'Contact 1',
        'contact1_hp' => 'Contact 1',
        'contact1_tweeter' => 'Contact 1',
        'contact1_pin_bb' => 'Contact 1',
        
        'contact2_photo' => 'Contact 2',
        'contact2_name' => 'Contact 2',
        'contact2_position' => 'Contact 2',
        'contact2_email' => 'Contact 2',
        'contact2_phone' => 'Contact 2',
        'contact2_fax' => 'Contact 2',
        'contact2_hp' => 'Contact 2',
        'contact2_tweeter' => 'Contact 2',
        'contact2_pin_bb' => 'Contact 2',
    ),
    'fieldTabSet' => array(
        'address1_type'     => 'Address &amp; Contact',
        'address1_address'  => 'Address &amp; Contact',
        'address1_country'  => 'Address &amp; Contact',
        'address1_province' => 'Address &amp; Contact',
        'address1_regency'  => 'Address &amp; Contact',
        'address1_pos_code' => 'Address &amp; Contact',
        'address1_email'    => 'Address &amp; Contact',
        'address1_phone'    => 'Address &amp; Contact',
        'address1_fax'      => 'Address &amp; Contact',

        'address2_type'     => 'Address &amp; Contact',
        'address2_address'  => 'Address &amp; Contact',
        'address2_country'  => 'Address &amp; Contact',
        'address2_province' => 'Address &amp; Contact',
        'address2_regency'  => 'Address &amp; Contact',
        'address2_pos_code' => 'Address &amp; Contact',
        'address2_email'    => 'Address &amp; Contact',
        'address2_phone'    => 'Address &amp; Contact',
        'address2_fax'      => 'Address &amp; Contact',
        
        'contact1_photo' => 'Address &amp; Contact',
        'contact1_name' => 'Address &amp; Contact',
        'contact1_position' => 'Address &amp; Contact',
        'contact1_email' => 'Address &amp; Contact',
        'contact1_phone' => 'Address &amp; Contact',
        'contact1_fax' => 'Address &amp; Contact',
        'contact1_hp' => 'Address &amp; Contact',
        'contact1_tweeter' => 'Address &amp; Contact',
        'contact1_pin_bb' => 'Address &amp; Contact',
        
        'contact2_photo' => 'Address &amp; Contact',
        'contact2_name' => 'Address &amp; Contact',
        'contact2_position' => 'Address &amp; Contact',
        'contact2_email' => 'Address &amp; Contact',
        'contact2_phone' => 'Address &amp; Contact',
        'contact2_fax' => 'Address &amp; Contact',
        'contact2_hp' => 'Address &amp; Contact',
        'contact2_tweeter' => 'Address &amp; Contact',
        'contact2_pin_bb' => 'Address &amp; Contact',
    ),
    
    'fieldOnList' => array(
        'Id'    => true, 
        'code'  => true,
        'name'  => true ,
        'manuf' => true,
        'is_checked' => TRUE,
        'is_approved'   => TRUE,
    ),
    'fieldOnSearch' => array(
        'code'  => true,
        'name'  => true ,
    ),    
    'accessLevel' => 2, // 1= Access, Manage ; 2 = Access, Create, Update, Delete ; 3 : no access level
    
    'isAutoGenerate' => true,
    
    'isGenerateDO'        => true,
    'isGenerateForm'      => true,
    'isGenerateView'      => true,
    'isGenerateDashboard' => true,
    'isGenerateMod'       => FALSE,
    'isGenerateMenu'      => FALSE,    
    'isGenerateUserAccess'=> FALSE,    
);
